package cn.tedu.spring.config;

import cn.tedu.spring.dibase.UserDao;
import cn.tedu.spring.file.Database;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestSpringConfig {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext acac = new AnnotationConfigApplicationContext("cn/tedu/spring/config");
        Database database = acac.getBean(Database.class);
        System.out.println("database = " + database);
        UserDao userDao = acac.getBean(UserDao.class);
        System.out.println("userDao = " + userDao);

    }
}
